//
//  UIEdgeInsets+Extension.swift
//  mall-ios
//
//  Created by Meak Tsui on 2018/12/17.
//  Copyright © 2018 Meak Tsui. All rights reserved.
//

import Foundation
import UIKit

extension UIEdgeInsets {
    public static func + (lhs: UIEdgeInsets, rhs: UIEdgeInsets) -> UIEdgeInsets {
        return UIEdgeInsets(top: lhs.top+rhs.top, left: lhs.left+rhs.left, bottom: lhs.bottom+rhs.bottom, right: lhs.right+rhs.right)
    }
    public static func - (lhs: UIEdgeInsets, rhs: UIEdgeInsets) -> UIEdgeInsets {
        return UIEdgeInsets(top: lhs.top-rhs.top, left: lhs.left-rhs.left, bottom: lhs.bottom-rhs.bottom, right: lhs.right-rhs.right)
    }
    public static func * (lhs: UIEdgeInsets, rhs: UIEdgeInsets) -> UIEdgeInsets {
        return UIEdgeInsets(top: lhs.top*rhs.top, left: lhs.left*rhs.left, bottom: lhs.bottom*rhs.bottom, right: lhs.right*rhs.right)
    }
    public static func / (lhs: UIEdgeInsets, rhs: UIEdgeInsets) -> UIEdgeInsets {
        return UIEdgeInsets(top: lhs.top/rhs.top, left: lhs.left/rhs.left, bottom: lhs.bottom/rhs.bottom, right: lhs.right/rhs.right)
    }
}
